#include "main.h"
#include "CBL_TestManager.h"
#include "CBL_Debug.h"
#include "VectorTest.h"
#include "MatrixTest.h"
#include "IdMapTest.h"
#include "IntrusiveListTest.h"
#include "MemoryPoolTest.h"
#include "DelegateTest.h"
#include "PointerTest.h"
#include "ThreadPoolTest.h"
#include "TinyXMLSerializationTest.h"
#include "XMLSerializationTest.h"
#include "CBL_Cpu.h"
#include "CBL_Profile.h"

#include <time.h>
#include <iostream>

int main(int _ArgCount, char** _ArgValues)
{
	Cb::Debug::CProfileManager::CreateInstance();
	
    Cb::Test::CTestManager& rTestManager = Cb::Test::CTestManager::CreateInstance();
	
	CVectorTest					VectorTest;
	CMatrixTest					MatrixTest;
	CIdMapTest					IdMapTest;
	CIntrusiveListTest			IntrusiveListTest;
	CMemoryPoolTest				MemoryPoolTest;
	CDelegateTest				DelegateTest;
    CPointerTest				PointerTest;
    CThreadPoolTest				ThreadTest;
    CTinyXMLSerializationTest  	TinyXMLTest;
    CXMLSerializationTest		XMLTest;
	
	rTestManager.RunTests();
	rTestManager.Release();
	
	Cb::Debug::CProfileManager::GetInstance().PrintReport();
	Cb::Debug::CProfileManager::Release();

	Cb::Debug::Assert(CB_DEBUG_MSG(false, "Tests finished."));
}